#include <stdio.h>

FILE *fp;
char buf[1024];

int main(int argc, char const *argv[])
{
    fp = fopen("txt2.txt", "r+");
    fread(buf, 1, 20, fp);
    fseek(fp, (long)20, 0);
    fwrite(buf, 1, 20, fp);
    return 0;
}
